package com.block.sms.service.send;

import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.block.common.constant.AppRspCodeConstant;
import com.block.db.entity.SmsConfigInfo;
import com.block.db.entity.SmsTemplateInfo;
import com.block.sms.dto.*;
import com.block.sms.service.ISmsSendService;
import org.springframework.stereotype.Service;

/**
 * 做测试用
 */
@Service
public class
DefaultProcessServiceImpl implements ISmsSendService {


    @Override
    public SmsResultDTO sendSms(SmsParamDTO smsParamDTO, SmsTemplateInfo smsTemplate, SmsConfigInfo smsConfigInfo) {
        SmsResultDTO resultDTO = new SmsResultDTO();
        resultDTO.setSuccess(true);
        resultDTO.setCode(AppRspCodeConstant.SUCCESS);
        resultDTO.setMessage("发送成功");
        resultDTO.setOutOrderNo(RandomUtil.randomString(16));
        resultDTO.setResult("发送完成");
        return resultDTO;
    }

    @Override
    public SmsBalanceDTO queryBalanceInfo(SmsConfigInfo smsConfigInfo) {
        return null;
    }

    @Override
    public QueryResultDTO querySendResult(QueryParamDTO queryParamDTO, SmsConfigInfo smsConfigInfo) {
        QueryResultDTO queryResultDTO = new QueryResultDTO();
        queryResultDTO.setStatus("SUCCESS");

        return queryResultDTO;
    }
}
